﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SDFL.KeyPoints.DesignPattern.Strategy.Structural
{
    /// <summary>
    /// The 'Context' class
    /// </summary>
    class Context
    {
        // maintains a reference to a Strategy object
        private Strategy _strategy;

        // Constructor
        // configured with a ConcreteStrategy object
        public Context(Strategy strategy)
        {
            this._strategy = strategy;
        }

        // define an interface that lets Strategy access its method.
        public void ContextInterface()
        {
            _strategy.AlgorithmInterface();
        }
    }
}
